<include file="__THEME__/header" />
<link href="../Public/css/bbs.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/js/kissy/themes/default/editor-min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/js/kissy/neweditor.js"></script>
<div class="ask_add"> {:L('current_position')}：{$_topnav} >> <a href="{:U('bbs/Index/detail',array('id'=>$postInfo['tid']))}">{$postInfo.title}</a> >> {:L('edit_thread')} </div>
<style>
.page_title {top:36px;}</style>

<!--发布样式 begi-->
<div class="contents">
  <div class="lineC">
    <h3 class="tit_bg">{:L('edit_thread')}</h3>
    <div class="add_vote" style="width:99%; overflow:hidden;">
	<form action="{:U('bbs/Do/doedit')}" method="post" autocomplete="off" onsubmit="return checkForm();return false;">
	<input type="hidden" name="pid" id="pid" value="{$postInfo.id}">
      <table align="left" style="line-height:25px;" width="100%">
        <tr height="30">
          <td width="10%">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
<!--		
         <tr height="40">
          <td height="40" align="right" valign="middle">版块：</td>
          <td align="left">
          	<div id="categorySelectedList" style="float:left;color:green;">
			{$defaultCategory|implode=' > ',###}
			&nbsp;</div> 
            <div  style="float:left;" >
            	<img class="pl5 alM" src="../Public/images/title_icon_02.gif" align="absmiddle" />
				<a class="pl5" href="javascript:void(0)" onclick="selectCategory()" >更改版块</a>
			</div>
			
		</td>
        </tr>
-->
<eq name="postInfo['istopic']" value="1">	
        <tr height="40">
          <td align="right" valign="top">{:L('edit_title')}：</td>
          <td align="left">
          	<select name="tclass" id="tclass" class="in_put_01">
          		<php>if( $tclasslist  ){</php>
	       			<volist id="vo" name="tclasslist">
	       				<php>$selected = ($postInfo['tclass']==$key) ? 'selected' :'' </php>
	          			<option value="{$key}" {$selected}>{$vo}</option>
					</volist>
				<php>}else{</php>
          			<option value="0">{:L('edit_default_tclass')}</option>
				<php>}</php>
   
          	</select>
			<input type="text"  name="title" id="title" class="in_put" value="{$postInfo.title}" style="width:250px;" value=""/>
			<div class="L" id="vote">{:W('Vote',array('app'=>'bbs', 'field'=>'id', 'fieldId'=>$postInfo['tid'], 'type'=>'edit', 'tpl'=>'Vote'))}</div>
			</td>
        </tr>
</eq>

        <tr height="40">
          <td align="right" valign="top">{:L('edit_content')}：</td>
          <td align="left">
        	<textarea  class="in_put " name="content"  cols="" rows="20" id="content" style="width:680px; margin-bottom:10px;" >{$postInfo.content}</textarea>
          </td>
        </tr>
		
<eq name="postInfo['istopic']" value="1">
    <tr height="40">
      <td align="right">{:L('thread_tag')}：</td>
      <td align="left"><input class="w125 in_put mr10" name="tags" id="tags" type="text" value="{$postInfo.ttags}" />
        <a class="pr10" href="javascript:void(0)" onclick="autoTags()">{:L('thread_tag_auto')}</a><span class="cl06">{:L('thread_tag_info')}</span></td>
    </tr>
</eq>

        <tr height="40">
          <td align="right" valign="top">{:L('thread_attach')}：</td>
          <td align="left" valign="top">
              {:W( 'UploadAttach',array( 'uid'=>$mid , 'type'=>'bbs' , 'callback'=>'attach_upload_success' , 'edit'=>$postInfo['attach'] ) )}
			  <div class="attach"></div>
           </td>
	   </tr>		
         <tr height="40">
          <td></td>
          <td align="left" valign="center">
            <input class="btn_sea mr5" name="" type="submit" value="{:L('edit_submit')}" />
            <input class="btn_sea" name="" type="button" onclick="javascript:history.back(-1)" value="{:L('edit_back')}" />
			</td>
        </tr>
      </table>
	  	</form>
      </div>
    <!--右边警告 begin-->
    <div class="C"> </div>
  </div>
  <!--右边警告 begin-->
</div>
<script>

	
$(document).ready(function(){
	E	=	KISSY.Editor( "content" );
});

function checkForm(){
	
<eq name="postInfo['istopic']" value="1">
	if( $.trim( $('#title').val() ) <=5 ){
		$.tbox.no("{:L('edit_un_validate')}","{:L('wrong')}");
		$('#title').focus();
		return false;
	}
	
</eq>
	if( E.getData().length<2 ){
		$.tbox.no("{:L('edit_content_empty')}","{:L('wrong')}");
		E._focusToEnd()
		return false;
	}
		
}

</script>
<include file="__THEME__/footer" /> 